﻿<?xml version="1.0" encoding="UTF-8" ?>
<mapping:sqlMap namespace="UserInfo" xmlns:mapping="http://ibatis.apache.org/mapping">
  <mapping:alias>
    <mapping:typeAlias alias="UserInfo" assembly="K.EnterpriseLibary.dll" type="K.EnterpriseLibary.Entity.UserInfo" />
  </mapping:alias>
  <mapping:resultMaps>
    <mapping:resultMap id="UserInfoResult" class="UserInfo">
      [UserID]
      ,[Email]
      ,[UserName]
      ,[Mobile]
      ,[Password]
      ,[TrueName]
      ,[Sex]
      ,[Marriage]
      ,[BindMoblie]
      ,[State]
      ,[LastLoginTime]
      ,[LastLoginIP]
      ,[LoginTimes]
      ,[ProvinceID]
      ,[City]
      ,[RegTime]
      ,[RegIP]
      ,[Portrait]
      ,[InviterID]
      ,[VerifyCode]
      ,[ConfirmTime]
      ,[isRec]
      ,[integral]
      ,[inteyb]
      ,[Click]
      ,[isAdmin]
      ,[AttNumber]
      ,[MobileCode]
      ,[IsVip]
      ,[Money]
      ,[MemberLevels]
      <mapping:result property="Id" column="ID"/>
      <mapping:result property="Length" column="LENGTH"/>
      <mapping:result property="Width" column="WIDTH"/>
      <mapping:result property="Height" column="HEIGHT" />
      <mapping:result property="Weight" column="WEIGHT" />
    </mapping:resultMap>
  </mapping:resultMaps>
  <!-- =============================================
        MAPPED STATEMENTS 
    ============================================= 
    -->
  <mapping:statements>

    <mapping:insert id="InsertCarton" parameterClass="Carton">
      insert into K_CARTON
      ( ID, LENGTH, WIDTH,
      HEIGHT, WEIGHT)
      values
      ( #Id#, #Length#, #Width#,
      #Height#, #Weight#)
    </mapping:insert>

    <mapping:update id="UpdateCarton" parameterClass="Carton">
      update K_CARTON
      set LENGTH = #Length#,
      WIDTH = #Width#,
      HEIGHT = #Height#,
      WEIGHT = #Weight#
      where ID = #Id#
    </mapping:update>

    <mapping:select id="SelectCarton" resultMap="CartonResult" parameterClass="Carton">
      select ID,LENGTH,
      WIDTH,
      HEIGHT,
      WEIGHT from K_CARTON
      where ID = #Id#
    </mapping:select>

  </mapping:statements>



</mapping:sqlMap>